﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="RegisterPage.aspx.cs" Inherits="EmployeeCheckIn.RegisterPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .style1
        {
            width: 100%;
            height: 544px;
            margin-bottom: 280px;
        }
        .style3
        {
            width: 157px;
            height: 22px;
        }
        .style5
        {
            width: 157px;
            height: 89px;
        }
        .style8
        {
            width: 655px;
        }
        .style9
        {
            height: 22px;
            width: 655px;
        }
        .style10
        {
            height: 89px;
            width: 655px;
        }
        .style11
        {
            color: #DFDFDF;
        }
        .style12
        {
            height: 54px;
        }
        .style13
        {
            width: 157px;
            height: 26px;
        }
        .style14
        {
            width: 655px;
            height: 26px;
        }
        .style15
        {
            width: 82px;
        }
        .style16
        {
            width: 157px;
        }
        .style17
        {
            width: 300px;
        }
        .style18
        {
            height: 65px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <table class="style1">
        <tr>
            <td colspan="4" bgcolor="White" class="style18" align="left">
                &nbsp;&nbsp;<span class="style11" style="font-size: large; color: #000000; background-color: #FFFFFF;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    ลงทะเบียน</span>
            </td>
        </tr>
        <tr>
            <td class="style17" bgcolor="White" rowspan="2">
                &nbsp;
            </td>
            <td class="style16" align="right" style="color: #000000">
                รหัสพนักงาน
            </td>
            <td class="style8">
                <asp:TextBox ID="txtEmp_code" runat="server" Width="170px" Enabled="False"></asp:TextBox>
                <asp:Label ID="lbEmpCode" runat="server" ForeColor="Red" Text="Label" Visible="False"></asp:Label>
                <asp:HiddenField ID="hdf_EmpID" runat="server" />
            </td>
            <td bgcolor="White" rowspan="17" class="style15">
                &nbsp;
            </td>
        </tr>
        <tr>
            <td class="style16" align="right" style="color: #000000">
                คำนำหน้า
            </td>
            <td class="style8">
                <asp:RadioButtonList ID="rblPrefix" runat="server" RepeatDirection="Horizontal">
                    <asp:ListItem Selected="True" Value="1">นาย</asp:ListItem>
                    <asp:ListItem Value="2">นาง</asp:ListItem>
                    <asp:ListItem Value="3">นางสาว</asp:ListItem>
                </asp:RadioButtonList>
            </td>
        </tr>
        <tr>
            <td class="style17" bgcolor="White" rowspan="2">
                &nbsp;
            </td>
            <td class="style16" align="right" style="color: #000000">
                <span class="RedText">*</span>ชื่อ:
            </td>
            <td class="style8">
                <asp:TextBox ID="txtFirstName" runat="server" Width="170px"></asp:TextBox>
                <asp:Label ID="lbWarnName" runat="server" ForeColor="Red" Text="Label" Visible="False"></asp:Label>
            </td>
        </tr>
        <tr>
            <td class="style13" align="right" style="color: #000000">
                <span class="RedText">*</span>สกุล:
            </td>
            <td class="style14">
                <asp:TextBox ID="txtLastname" runat="server" Width="170px"></asp:TextBox>
                <asp:Label ID="lbWarnLastname" runat="server" ForeColor="Red" Text="Label" Visible="False"></asp:Label>
            </td>
        </tr>
        <tr>
            <td class="style17" bgcolor="White" rowspan="2">
                &nbsp;
            </td>
            <td class="style3" align="right" style="color: #000000">
                ตำแหน่ง:
            </td>
            <td class="style9">
                <asp:DropDownList ID="ddlPosition" runat="server" DataSourceID="lnqPositionRegis"
                    DataTextField="POSITION_NAME" DataValueField="POSITION_ID" Width="170px">
                </asp:DropDownList>
                <asp:LinqDataSource ID="lnqPositionRegis" runat="server" ContextTypeName="EmployeeCheckIn.PositionDataContext"
                    Select="new (POSITION_ID, POSITION_NAME)" TableName="TBL_POSITIONs">
                </asp:LinqDataSource>
            </td>
        </tr>
        <tr>
            <td class="style16" align="right" style="color: #000000">
                วันเริ่มทำงาน:
            </td>
            <td class="style8">
                <asp:TextBox ID="txtStartdate" runat="server" Width="170px" class="dateInput"></asp:TextBox>
                <asp:Label ID="lbStdate" runat="server" ForeColor="Red" Text="Label" Visible="False"></asp:Label>
            </td>
        </tr>
        <tr>
            <td class="style17" bgcolor="White">
                &nbsp;
            </td>
            <td class="style13" align="right" style="color: #000000">
                วันเกิด:
            </td>
            <td class="style14">
                <asp:TextBox ID="txtBirthDate" runat="server" Width="170px" class="dateInput"></asp:TextBox>
                <asp:Label ID="lbWarnBirth" runat="server" ForeColor="Red" Text="Label" Visible="False"></asp:Label>
            </td>
        </tr>
        <tr>
            <td class="style17" bgcolor="White">
                &nbsp;
            </td>
            <td class="style16" align="right" style="color: #000000">
                รหัสบัตรประชาชน:
            </td>
            <td class="style8">
                <asp:TextBox ID="txtIdCard" runat="server" Width="170px"></asp:TextBox>
                <asp:Label ID="lbWarnIDc" runat="server" ForeColor="Red" Text="Label" Visible="False"></asp:Label>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator2" ValidationGroup = "g1" runat="server" ControlToValidate="txtIdCard"
                    ErrorMessage="กรุณากรอกเป็นตัวเลขเท่านั้น" ForeColor="Red" ValidationExpression="^\d*"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td class="style17" bgcolor="White">
                &nbsp;
            </td>
            <td class="style5" align="right" style="color: #000000" rowspan="2">
                ที่อยู่:
            </td>
            <td class="style10" rowspan="2">
                <asp:TextBox ID="txtAddress" runat="server" Height="75px" TextMode="MultiLine" Width="227px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="style17" bgcolor="White">
                &nbsp;
            </td>
        </tr>
        <tr>
            <td class="style17" bgcolor="White">
                &nbsp;
            </td>
            <td class="style16" align="right" style="color: #000000">
                จังหวัด:
            </td>
            <td id="ddlPosition" class="style8">
                <asp:DropDownList ID="ddlProvince" runat="server" DataSourceID="lnqProvinceRegis"
                    DataTextField="PROVINCE_NAME" DataValueField="PROVINCE_ID" Width="170px">
                </asp:DropDownList>
                <asp:LinqDataSource ID="lnqProvinceRegis" runat="server" ContextTypeName="EmployeeCheckIn.ProvinceDataContext"
                    Select="new (PROVINCE_ID, PROVINCE_NAME)" TableName="TBL_PROVINCEs">
                </asp:LinqDataSource>
            </td>
        </tr>
        <tr>
            <td class="style17" bgcolor="White">
                &nbsp;
            </td>
            <td class="style16" align="right" style="color: #000000">
                รหัสไปรษณีย์:
            </td>
            <td class="style8">
                <asp:TextBox ID="txtPostId" runat="server" Width="170px"></asp:TextBox>
                <asp:Label ID="lbWarnPost" runat="server" ForeColor="Red" Text="Label" Visible="False"></asp:Label>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" ControlToValidate="txtPostId"
                    ErrorMessage="กรุณากรอกเป็นตัวเลขเท่านั้น" ForeColor="Red" ValidationExpression="^\d*"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td class="style17" bgcolor="White">
                &nbsp;
            </td>
            <td class="style16" align="right" style="color: #000000">
                โทร:
            </td>
            <td class="style8">
                <asp:TextBox ID="txtTel" runat="server" Width="170px"></asp:TextBox>
                <asp:Label ID="lbWarnPhone" runat="server" ForeColor="Red" Text="Label" Visible="False"></asp:Label>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtTel"
                    ErrorMessage="กรุณากรอกเป็นตัวเลขเท่านั้น" ForeColor="Red" ValidationExpression="^\d*"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td class="style17" bgcolor="White">
                &nbsp;
            </td>
            <td class="style16" align="right" style="color: #000000">
                รูปโปรไฟล์:
            </td>
            <td class="style8">
                <asp:FileUpload ID="upfPicture" runat="server" />
                <asp:Label ID="lbUpsucsess" runat="server" Text="&quot;.gif&quot;, &quot;.png&quot;, &quot;.jpeg&quot;, &quot;.jpg&quot;"
                    ForeColor="Red"></asp:Label>
            </td>
        </tr>
        <tr>
            <td class="style17" bgcolor="White">
                &nbsp;
            </td>
            <td class="style16" align="right" style="color: #000000">
                สถานะ:
            </td>
            <td class="style8">
                <asp:DropDownList ID="ddlStatus" runat="server" DataSourceID="lnqStatusRegis" DataTextField="EMP_STATUS_NAME"
                    DataValueField="EMP_STATUS_ID">
                </asp:DropDownList>
                <asp:LinqDataSource ID="lnqStatusRegis" runat="server" ContextTypeName="EmployeeCheckIn.linqStatus1DataContext"
                    Select="new (EMP_STATUS_ID, EMP_STATUS_NAME)" TableName="TBL_STATUS" Where="EMP_STATUS_ID != @EMP_STATUS_ID">
                    <WhereParameters>
                        <asp:Parameter DefaultValue="3" Name="EMP_STATUS_ID" Type="Int32" />
                    </WhereParameters>
                </asp:LinqDataSource>
            </td>
        </tr>
        <tr>
            <td class="style17" bgcolor="White">
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            </td>
            <td class="style16">
                &nbsp;
            </td>
            <td align="left" class="style8">
                <asp:Button ID="btRegister" runat="server" Style="margin-left: 0px; height: 26px;"
                    Text="บันทึก" Width="50px" OnClick="btRegister_Click1" />
                &nbsp;<asp:Button ID="Button1" runat="server" Style="margin-left: 79px; height: 26px;"
                    Text="รีเซ็ต" Width="50px" OnClick="Button1_Click" />
            </td>
        </tr>
        <tr>
            <td class="style17" bgcolor="White">
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:Button ID="Button2" runat="server" Text="กลับสู่หน้าหลัก" OnClick="Button2_Click"
                    Width="97px" />
            </td>
            <td class="style12" bgcolor="White" colspan="2">
                <asp:LinqDataSource ID="LinqDataSource1" runat="server">
                </asp:LinqDataSource>
            </td>
        </tr>
    </table>
</asp:Content>
